<template>
  <div class="copyNot examAnswer c-p">
    <watermark
      v-if="showExamWatermark"
      :watermarkContent="examWatermarkConfig && examWatermarkConfig.contentType == 2 ? examWatermarkConfig.content : ''"
      :fontSize="examWatermarkConfig && examWatermarkConfig.size ? examWatermarkConfig.size : 14"
      :contentFillStyle="examWatermarkConfig && examWatermarkConfig.color ? examWatermarkConfig.color : '#999999'"
      :opacityNum="examWatermarkConfig ? examWatermarkConfig.transparent / 100 : 0.3"
    ></watermark>
    <div>
      <audio id="audio" preload="auto" @error="playAudioError" @ended="playAudioEnd" @onPlayTimeChange="onPlayTimeChange" :curPlayTime="audioPlayTime" class="c-pf c-p-l-100"></audio>
      <audio id="nextAudio" preload="auto" class="c-pf c-p-l-100"></audio>
      <audio id="audioSelf" @ended="playAudioSelfEnd" class="c-pf c-p-l-100"></audio>
      <audio
        id="ancyaudio"
        preload="auto"
        @error="ancyPlayAudioError"
        @ended="ancyPlayAudioEnd"
        @onPlayTimeChange="ancyOnPlayTimeChange"
        :curPlayTime="ancyaudioPlayTime"
        class="c-pf c-p-l-100"
      ></audio>
      <countdown ref='startAnimation' v-if="showStart" @hideCountdown="hideCountdown"></countdown>
      <div v-show="!showStart" class="c-pb130" v-if="questionInfo!=null">
        <div class="newTest c-fs24 c-pv10" v-if="questionInfo.logType==2">检测到最新版本，再次练习可获取</div>
        <div class="c-ph24 ">
          <div class="c-flex-row c-aligni-center c-fs24 c-hh100 c-fc-xblack c-bd-b1-f6">
            <div class="c-flex-grow1 c-flex-row c-aligni-center">
              <span><b class="c-fc-mblue c-fw-n">{{questionInfo.number}}</b>/{{questionInfo.totalNum}}</span>
              <div
                @click="clickNextQuestion(3,1)"
                class="c-fc-white c-br10 c-ww100 c-hh46 c-fs28 c-lh46 c-ml30 c-textAlign-c c-br24 bg-lineargradient"
              >
                交卷
              </div>
            </div>
            <div class="c-flex-row c-aligni-center">
              <div class="c-flex-row c-aligni-center c-ph10 c-bg-time c-pv5 c-br8">
                <span class="c-fc-mblue">{{ answerTime }}</span>
              </div>
              <div class="c-flex-row c-aligni-center c-ph10 c-pv5 c-br8">
                <img class="c-ww30" src="../../../assets/i/wap/exam/right.png" alt="">
                <span class="c-ml12 c-fs24 c-fc-sblack c-mr40">{{questionInfo.rightNum}}题</span>
                <img class="c-ww30" src="../../../assets/i/wap/exam/error.png" alt="">
                <span class="c-ml12 c-fs24 c-fc-sblack">{{questionInfo.errorNum}}题</span>
              </div>
            </div>
          </div>
        </div>
        <div class="c-flex-row c-aligni-center c-ph24 c-pv30">
          <div class="c-fs26 c-fc-xblack c-flex-grow1 c-fw-b">
            {{questionInfo.type==1?'单选题':(questionInfo.type==2?'多选题':(questionInfo.type==4?"判断题":(questionInfo.type==5?"填空题":questionInfo.type==11?'完型填空题':questionInfo.type==3?'问答题':'阅读理解题')))}}
          </div>
          <div v-if="questionInfo.status!=-1&&isCollect==0" @click="questionCollect" class="c-flex-row c-aligni-center c-mr20">
            <div class="iconfont c-fs24 " :class="questionInfo.isCollect==1?'c-fc-sorange':'c-fc-gray'">{{questionInfo.isCollect==1?'&#xe823;':'&#xe81a;'}}</div>
            <div class="c-fs22 c-fc-gray c-ml6">{{questionInfo.isCollect==1?'已收藏':'收藏'}}</div>
          </div>
          <div v-if="isFeedback == 0&&questionInfo.status!=-1" class="c-ww120 c-fc-mblue c-bd1-ssmblue c-br20 c-fs22 c-textAlign-c c-lh36 c-hh36" @click="wrongFeedback">错题反馈</div>
          <div v-if="isFeedback == 1||questionInfo.status==-1" class="c-ww120 c-fc-white c-bd1-d7 c-bg-d7 c-br20 c-fs22 c-textAlign-c c-lh36 c-hh36">{{questionInfo.status==-1?'错题反馈':'已反馈'}}</div>
        </div>
        <div v-show="questionInfo.status!=-1&&questionInfo.problem">
          <!-- 视频题 -->
          <div class="c-fs28 c-fc-xblack c-ph24 c-pb24" v-if="(questionInfo.resourceType==1||questionInfo.resourceType==2)&&questionInfo.resourceUrl!=''">欣赏下面片段作答 。</div>
          <section v-show="questionInfo.resourceType==1&&questionInfo.resourceUrl!=''" class="c-hh360 c-ph24 c-p">
            <div id="liveVideoIntroParent" class="c-w100-im"></div>
            <div v-show="!playing" class="c-pa  c-p-l0 c-p-t0 c-p-r0 c-h c-flex-row c-aligni-center c-justify-center c-mh24 c-pz100 c-bg-black c-pz100" @click="Videoplay">
              <span class="iconfont c-fc-white c-fs100">&#xe869;</span>
            </div>
            <div class="c-p-l0 c-pa c-ph16 c-p-t0 c-w100 c-h c-pz100" v-if="questionInfo.assetStatus==-1">
              <div class="c-br8 c-translucent-balck60 c-w100 c-h">
                <div class="iconfont c-fc-white c-fs108 c-textAlign-c c-pt100">&#xe963;</div>
                <div class="c-fs24 c-fc-f2 c-textAlign-c">该视频已被管理员删除，如有疑问请咨询客服</div>
              </div>
            </div>
          </section>
          <!-- 音频题 -->
          <section v-show="questionInfo.resourceType==2&&questionInfo.resourceUrl!=''" class="c-ph24 ">
            <div class="c-bg-xgreen c-flex-row c-aligni-center c-br8 c-ph16 c-p">
              <div class="c-mr30 c-ww54"><img class="c-w100" src="@/assets/i/wap/exam/voice_icon.png" alt=""></div>
              <div class="c-flex-grow1 c-mr48">
                <div class="c-fc-white c-fs20 c-mt14 c-mb10 c-maxw440">{{questionInfo.resourceName}}</div>
                <vue-slider class="audioPlay" :height="2" :processStyle="processStyle" :railStyle="railStyle" :dotOptions="dotOptions" v-model="audioPlayTime" tooltip="none" :lazy="true" :max="duration"
                  @drag-start="dragStart" @dragging="dragging" @drag-end="dragEnddragEnd" @change="inputChange">
                  <template slot="dot">
                    <div class="dot-peinner c-ww22 c-hh22 c-brp50"><span class="c-ww22" style="text-align: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);"></span></div>
                  </template>
                </vue-slider>
                <div class="c-flex-row c-aligni-center c-justify-sb c-fs16 c-fc-white c-mt5 c-pb15">
                  <div>{{playtime}}</div>
                  <div>{{playtotalTime}}</div>
                </div>
              </div>
              <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="showFirstSpeak" @click="firstPlay">&#xe8ed;</div>
              <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="!showLoudspeaker&&!showFirstSpeak" @click="replay">&#xe8ed;</div>
              <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="showLoudspeaker && !showFirstSpeak" @click="pause">&#xe8ef;</div>
              <div v-if="questionInfo.assetStatus==-1" class="c-flex-row c-aligni-center c-br8 c-ph16 c-pa c-translucent-balck60 c-p-t0 c-pz10 c-p-l0 c-w100 c-h">
                <div class="iconfont c-fc-white c-fs40">&#xe963;</div>
                <div class="c-fs24 c-fc-f2 c-ml16">该音频已被管理员删除，如有疑问请咨询客服</div>
              </div>
            </div>
          </section>
          <div class="c-ph24 c-pb22 c-fs28 c-wb-ba c-pt12" v-if="questionInfo.type!=9">
            <span class="fl c-lh46">({{questionInfo.number}})</span>
            <span class="c-lh46 c-fs24 c-fc-xblack c-wb-ba copyNot imgInlineb c-textAlign-j problemdDom" @click="clickDesc" v-html="questionInfo.problem"></span>
          </div>
          <div class="c-pb22 c-fs28 c-wb-ba c-pt12" v-if="questionInfo.type==9">
            <div
              class="c-ph24 c-pb40 c-fs28"
              style="box-shadow: 0px 5px 8px 0px rgba(0,0,0,0.03);"
            >
              <div
                :class="
                  moreQue && showmoTest ? '' : 'c-maxh150 c-text-hidden maxMask'
                "
              >
                <div ref="bigProblem">
                  <span class="fl c-lh36">({{ questionInfo.smallNumber }})</span>
                  <span
                    class="c-lh36 c-fs24 c-lh40 c-fc-xblack imgInlineb problemdDom"
                    :class="[cfg.isCopyPicture == 0 ? 'closeBig' : 'aCloseBig', cfg.isCopy == 0 ? 'copyNot' : '']"
                    @click="clickDesc"
                    v-html="questionInfo.bigProblem"
                  ></span>
                </div>
              </div>
              <div
                v-if="showmoTest"
                class="c-fc-mblue c-fs20 c-ww156 c-m-0auto c-mt30"
                @click="showMoreQue"
              >
                {{ moreQue ? "收起详情" : "展开余下详情"
                }}<span
                  class="iconfont c-fs22 c-ml10"
                  :class="moreQue ? 'chanDeg-90' : 'chanDeg90'"
                >&#xe93b;</span>
              </div>
            </div>
            <div class="c-ph24">
              <div class="c-br8 c-pb40">
                <div class="c-ph24 c-pb32 c-fs28 c-pt60">
                  <div class="c-ws-n c-mb20 c-fc-xblack">
                    <span class="c-inlineblack c-pv2 c-ph8 bg-e6 c-br4 c-mr4">{{
                      questionInfo.smallNumber + "/" + questionInfo.hasSmallNum
                    }}</span
                    >{{
                      questionInfo.smallType == 1
                        ? "单选题"
                        : questionInfo.smallType == 2
                          ? "多选题"
                          : questionInfo.smallType == 3
                            ? "问答题"
                            : questionInfo.smallType == 4
                              ? "判断题"
                              : questionInfo.smallType == 5
                                ? "填空题"
                                : ""
                    }}
                  </div>
                  <span
                    class="c-fs24 c-l40 c-fc-xblack imgInlineb problemdDom"
                    :class="[cfg.isCopyPicture == 0 ? 'closeBig' : 'aCloseBig', cfg.isCopy == 0 ? 'copyNot' : '']"
                    @click="clickDesc"
                    v-html="questionInfo.problem"
                  ></span>
                </div>
              </div>
            </div>
          </div>
          <div class="c-ww240 c-br25 c-bd1-ssmblue c-m-0auto c-mt40 c-lh50" v-show="questionInfo!=null && (questionInfo.type==11)&&!showAnalysis&&clickShow">
            <div v-show="!showStart" v-if='questionInfo!=null && (questionInfo.type==11)' class="c-fc-mblue c-fs24 c-textAlign-c" :class="showAnalysis==true?'c-fc-sgray':''" @click="showAnswer">查看解析及提交答案</div>
          </div>
          <div
            class="c-ph24"
            v-if="(questionInfo.type == 3 || questionInfo.smallType == 3)&&!showAnalysis"
          >
            <div class="c-w100 c-br10 c-bd1-mgray c-bg-fa c-ph20 c-pt20">
              <textarea
                v-model="essayAnswer"
                @focus="inputFocus"
                @blur="inputBlur"
                name=""
                id="inputArea"
                cols="30"
                rows="10"
                placeholder="请输入答案"
                class="needsclick show c-fs24 c-fc-xblack c-lh40 c-w100 c-bg-fa short-answer-textarea"
              ></textarea>
              <div class="c-pt30">
                <div class="c-flex-row c-flexw-wrap" v-if="uploadImgList.length > 0">
                  <div
                    v-for="(item, index) in uploadImgList"
                    :key="index"
                    class="c-ww160 c-hh160 c-mb24 c-flex-row c-flex-center c-p c-br10"
                    :class="index % 3 == 0 ? '' : 'c-ml20'"
                  >
                    <i @click.stop="delUploadImage(index)" class="iconfont c-fs28 del-img">&#xe757;</i>
                    <img
                      @click="clickPreviewImage(item.url)"
                      class="c-ww160 c-hh160"
                      :src="$addXossFilter(item.url)"
                      alt=""
                    />
                  </div>
                </div>
                <div class="c-flex-row c-flexw-wrap c-pt30" v-if="uploadAudioList.length > 0">
                  <div @click.stop="clickPlayAudio(item.url)" v-for="(item,index) in uploadAudioList" :key="index" :class="index % 3 == 0 ? '' : 'c-ml20'" class="c-ww160 c-hh60 c-br30 c-bg-ssmblue c-pl24 c-pr10 c-p c-flex-row c-aligni-center c-mb30">
                    <div class="box c-ww32">
                      <div class="wifi-symbol">
                        <div class="wifi-circle first c-bd2-white"></div>
                        <div class="wifi-circle second c-bd2-white" :class="playAduioSrc == item.url?'seconAnimation':''"></div>
                        <div class="wifi-circle third c-bd2-white" :class="playAduioSrc == item.url?'thirdAnimation':''"></div>
                      </div>
                    </div>
                    <div class="c-fs20 c-fc-white">{{item.time}}"</div>
                    <i @click.stop="clickDelAudio(index)" class="iconfont c-fs28 del-img">&#xe757;</i>
                  </div>
                </div>
                <div class="c-flex-row c-flexw-wrap">
                  <div class="c-p c-mr60 c-pb20">
                    <div @click="clickAnswerPic" class="c-w100">
                      <i class="iconfont c-fs32 c-fc-gray">&#xe75e;</i>
                    </div>
                    <input class="c-pa c-opacity0 c-p-t0 c-p-l0 c-w100 c-hh40 c-fs10"
                      v-if="!isWeiXin"
                      :disabled="leftNumFlag?true:false"
                      ref="uploadImg"
                      name="file"
                      type="file"
                      accept="image/*"
                      @change="clickAnswerPic($event)" />
                  </div>
                  <div @click="clickAddAudio" class="c-mr60">
                    <i class="iconfont c-fs32 c-fc-gray">&#xe75b;</i>
                  </div>
                </div>
                <!-- <div
                  class="c-ww160 c-hh160 c-mb24 c-p"
                  :class="uploadImgList.length % 3 == 0 ? '' : 'c-ml20'"
                >
                  <div
                    class="c-ww160 c-hh160 c-bd-d1-mgray c-bg-white c-br10 c-pt32"
                    @click="clickAnswerPic"
                  >
                    <div class="c-fs80 c-textAlign-c c-lh50 orange-opa">+</div>
                    <div class="c-fs22 c-fc-sblack c-textAlign-c c-mt20">
                      上传图片
                    </div>
                  </div>
                  <input
                    class="c-pa c-opacity0 c-p-t0 c-p-l0 c-ww160 c-hh160 c-fs10"
                    v-if="!isWeiXin"
                    :disabled="leftNumFlag?true:false"
                    ref="uploadImg"
                    name="file"
                    type="file"
                    accept="image/*"
                    @change="clickAnswerPic($event)"
                  />
                </div> -->
              </div>
            </div>
          </div>
          <div v-if="questionInfo.type==1 || questionInfo.type==2 || questionInfo.type==4||questionInfo.smallType == 1||questionInfo.smallType == 2||questionInfo.smallType == 4">
            <div v-for="(item,index) in optionsList" :key="index" class="c-ph24 c-flex-row c-pv20 c-fs28 c-mh90" @click="clickOption(index)">
              <div class="op-type c-ww50 c-hh50 c-brp50 c-lh50 c-textAlign-c" :class="optionClass[index]">{{item.type}}</div>
              <div class="c-pl20 c-lh50 c-wb-ba copyNot imgInlineb c-textAlign-j problemdDom" v-html="item.name"></div>
            </div>
          </div>
          <!-- <div v-if="questionInfo.type==11">
            <div v-for="(item,index) in optionsList" :key="index" class="c-ph24 c-flex-row c-pv20 c-fs28 c-mh90">
              <div class="op-type c-ww50 c-hh50 c-brp50 c-lh50 c-textAlign-c" :class="optionClass[index]">{{item.type}}</div>
              <div class="c-pl20 c-lh50 c-wb-ba copyNot imgInlineb c-textAlign-j problemdDom" @click="clickDesc" v-html="item.name"></div>
            </div>
          </div> -->
          <div class="c-ph24 c-mt24" v-if="!showAnalysis && (questionInfo.type==5||questionInfo.smallType == 5)">
            <div class="c-flex-row c-mb40" v-for="(item,index) in fbAnswer" :key="index">
              <div class="c-fs28 c-fc-xblack c-mr32 c-ww54 c-hh54 c-br36 c-bd1-mgray c-flex-row c-flex-center c-flex-shrink0">{{index + 1}}</div>
              <div class="c-flex-grow1 c-mr10 c-bd-b1-mgray"><input type="text" name="" id="" v-model="item.value" class="c-w100 c-fs28 c-fc-xblack c-bd0"></div>
            </div>
          </div>
          <div class="c-ww240 c-br25 c-bd1-ssmblue c-m-0auto c-mt40 c-lh50" v-show="questionInfo!=null && (questionInfo.type==2|| questionInfo.type==3 || questionInfo.type==5||questionInfo.smallType == 2||questionInfo.smallType == 5||questionInfo.smallType == 3)&&!showAnalysis&&clickShow">
            <div v-show="!showStart" v-if='questionInfo!=null && (questionInfo.type==2|| questionInfo.type==3 || questionInfo.type==5||questionInfo.smallType == 2||questionInfo.smallType == 5||questionInfo.smallType == 3)' class="c-fc-mblue c-fs24 c-textAlign-c" :class="showAnalysis==true?'c-fc-sgray':''" @click="showAnswer">查看解析及提交答案</div>
          </div>
          <div class="c-ph24 c-flex-row c-mt44 c-justify-sb" v-if="showAnalysis && (questionInfo.type<=2 || questionInfo.type==4||(questionInfo.smallType > 0&&questionInfo.smallType <= 2)||questionInfo.smallType == 4)">
            <div class="c-fs24 c-fc-xblack copyNot c-fs26 c-fc-1b c-fw-b">参考答案：{{questionInfo.type==4||questionInfo.smallType == 4?(questionInfo.answer==1?'正确':'错误'):questionInfo.answer}}</div>
            <div class="c-fs24 c-fc-xblack c-mr68 copyNot c-fs26 c-fc-1b c-fw-b">您的答案：<span class="" :class="questionInfo.type==4||questionInfo.smallType == 4?((questionInfo.answer==1&&userAnswer=='正确')||(questionInfo.answer==-1&&userAnswer=='错误')?'c-fc-mblue':'c-fc-reword'):questionInfo.answer==userAnswer?'c-fc-mblue':'c-fc-reword'">{{userAnswer==''?'未答题':userAnswer}}</span></div>
          </div>
          <div
            class="c-ph24 c-mt44"
            v-if="
              showAnalysis &&
                (questionInfo.type == 3 ||
                  questionInfo.smallType == 3 ||
                  (questionInfo.type == 9 && questionInfo.smallType == 3))
            "
          >
            <div class="c-fs26 c-fc-1b c-fw-b">您的答案：</div>
            <div
              class="c-fs24 c-fc-xblack c-mt14 c-ph20 c-pv16 c-br6 c-bd1-mgray copyNot"
            >
              {{ essayAnswer }}
            </div>
            <div
              class="c-pt30 c-flexw-wrap c-flex-row"
              v-if="uploadImgList.length > 0"
            >
              <div
                v-for="(item, index) in uploadImgList"
                :key="index"
                class="c-ww160 c-hh160 c-mb30 c-flex-row c-flex-center c-p "
                :class="index % 3 == 0 ? '' : 'c-ml20'"
              >
                <img
                  @click="clickPreviewImage(item.url)"
                  class="c-ww160 c-hh160"
                  :src="$addXossFilter(item.url)"
                  alt=""
                />
              </div>
            </div>
            <div class="c-flex-row c-flexw-wrap c-pt30" v-if="uploadAudioList.length > 0">
              <div @click.stop="clickPlayAudio(item.url)" v-for="(item,index) in uploadAudioList" :key="index" :class="index % 3 == 0 ? '' : 'c-ml20'" class="c-ww160 c-hh60 c-br30 c-bg-ssmblue c-pl24 c-pr10 c-p c-flex-row c-aligni-center c-mb30">
                <div class="box c-ww32">
                  <div class="wifi-symbol">
                    <div class="wifi-circle first c-bd2-white"></div>
                    <div class="wifi-circle second c-bd2-white" :class="playAduioSrc == item.url?'seconAnimation':''"></div>
                    <div class="wifi-circle third c-bd2-white" :class="playAduioSrc == item.url?'thirdAnimation':''"></div>
                  </div>
                </div>
                <div class="c-fs20 c-fc-white">{{item.time}}"</div>
              </div>
            </div>
          </div>
          <div
            class="c-ph24 c-mt44"
            v-if="
              showAnalysis &&
                (questionInfo.type == 3 ||
                  questionInfo.smallType == 3 ||
                  (questionInfo.type == 9 && questionInfo.smallType == 3))
            "
          >
            <div class="c-fs26 c-fc-1b c-fw-b">参考答案：</div>
            <div class="c-fs24 c-fc-xblack c-mt14 c-text-indent50 c-ph10 copyNot problemdDom" @click="clickDesc" v-html="questionInfo.answer">
            </div>
          </div>
          <div class="c-ph24 c-mt44" v-if="showAnalysis && (questionInfo.type==5||questionInfo.smallType == 5)">
            <div class="c-fs26 c-fc-1b c-fw-b">您的答案：</div>
            <div class="c-flex-row c-mt24 c-aligni-center" v-for="(item,index) in fbAnswer" :key="index">
              <div class="c-fs24 c-mr24 c-ww40 c-hh40 c-br36 c-bd1-mgray c-flex-row c-flex-center c-flex-shrink0">{{index + 1}}</div>
              <div class="c-fs24 c-fc-xblack c-flex-grow1 c-mr10" :class="fbAnswerStyle[index] == 'right' ? 'rightClass' : fbAnswerStyle[index] == 'wrong' ? 'c-fc-reword' : ''">{{item.value.trim() == ''?'未答题':item.value}}</div>
            </div>
          </div>
          <div class="c-ph24 c-mt44" v-if="showAnalysis && (questionInfo.type==5 ||questionInfo.smallType == 5)">
            <div class="c-fs26 c-fc-1b c-fw-b">参考答案：</div>
            <div class="c-flex-row c-mt24 c-aligni-center" v-for="(item,index) in questionInfo.answer" :key="index">
              <div class="c-fs24 c-fc-xblack c-mr24 c-ww40 c-hh40 c-br36 c-bd1-mgray c-flex-row c-flex-center c-flex-shrink0">{{index + 1}}</div>
              <div class="c-fs24 c-fc-xblack c-flex-grow1 c-mr10">{{item.value}}</div>
            </div>
          </div>
          <div class="c-ph24 c-mt44" v-if="showAnalysis && questionInfo.type==11">
            <div class="c-fs26 c-fc-1b c-fw-b">您的答案：</div>
            <span v-for="(item,index) in userAnswer" :key="index" :class="item.value==questionInfo.answer[index].value ? 'c-fc-mblue' : 'c-fc-reword'" class="c-fs24 c-mr10 copyNot c-fs26 c-fw-b">
              {{item.value == ''?'未答题':item.value}}{{userAnswer.length-1==index?'':","}}
            </span>
          </div>
          <div class="c-ph24 c-mt44" v-if="showAnalysis && questionInfo.type==11">
            <div class="c-fs26 c-fc-1b c-fw-b">参考答案：</div>
            <span class="c-fs24 c-mr10 copyNot c-fs26 c-fw-b" v-for="(item,index) in questionInfo.answer" :key="index">
              {{item.value}}{{questionInfo.answer.length-1==index?'':","}}
            </span>
          </div>
          <div class="c-ph24 c-mt44 Analysis" v-show="showAnalysis">
            <div class="c-fs26 c-fc-gray">解析：</div>
            <div class="c-fs24 c-fc-xblack c-mt14 c-text-indent50 c-ph10 copyNot c-textAlign-j c-wb-ba problemdDom" v-show="questionInfo.analysis != '' && questionInfo.analysis != ' '" @click="clickDesc" v-html="questionInfo.analysis"></div>
            <!-- 视频解析 -->
            <section v-show="questionInfo.analysisRtype==1&&questionInfo.analysisRurl!=''&&questionInfo.analysisRurl" class="c-hh360 c-p c-mt14">
              <div id="ancyVideoIntroParent" class="c-w100-im"></div>
              <div v-show="!ancyPlaying" class="c-pa c-p-l0 c-p-t0 c-p-r0 c-h c-flex-row c-aligni-center c-justify-center c-pz100 c-bg-black" @click="VideoplayAncy">
                <span class="iconfont c-fc-white c-fs100">&#xe869;</span>
              </div>
              <div class="c-p-l0 c-pa c-ph16 c-p-t0 c-w100 c-h c-pz100" v-if="questionInfo.analysisAssetStatus==-1">
                <div class="c-br8 c-translucent-balck60 c-w100 c-h">
                  <div class="iconfont c-fc-white c-fs108 c-textAlign-c c-pt100">&#xe963;</div>
                  <div class="c-fs24 c-fc-f2 c-textAlign-c">该视频已被管理员删除，如有疑问请咨询客服</div>
                </div>
              </div>
            </section>
            <!-- 音频解析 -->
            <section v-show="questionInfo.analysisRtype==2&&questionInfo.analysisRurl!=''&&questionInfo.analysisRurl" class="c-mt14">
              <div class="c-bg-xgreen c-flex-row c-aligni-center c-br8 c-ph16 c-p">
                <div class="c-mr30 c-ww54"><img class="c-w100" src="@/assets/i/wap/exam/voice_icon.png" alt=""></div>
                <div class="c-flex-grow1 c-mr48">
                  <div class="c-fc-white c-fs20 c-mt14 c-mb10 c-maxw440">{{questionInfo.analysisRname}}</div>
                  <vue-slider class="audioPlay" :height="2" :processStyle="processStyle" :railStyle="railStyle" :dotOptions="dotOptions" v-model="ancyaudioPlayTime" tooltip="none" :lazy="true" :max="ancyduration"
                    @drag-start="ancydragStart" @dragging="ancydragging" @drag-end="ancydragEnddragEnd" @change="ancyinputChange">
                    <template slot="dot">
                      <div class="dot-peinner c-ww22 c-hh22 c-brp50"><span class="c-ww22" style="text-align: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);"></span></div>
                    </template>
                  </vue-slider>
                  <div class="c-flex-row c-aligni-center c-justify-sb c-fs16 c-fc-white c-mt5 c-pb15">
                    <div>{{ancyplaytime}}</div>
                    <div>{{ancyplaytotalTime}}</div>
                  </div>
                </div>
                <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="ancyshowFirstSpeak" @click="ancyfirstPlay">&#xe8ed;</div>
                <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="!ancyshowLoudspeaker&&!ancyshowFirstSpeak" @click="ancyreplay">&#xe8ed;</div>
                <div class="c-ww52 c-lh26 c-whiteOpcity03 c-textAlign-c c-br12 iconfont c-fs12 c-fc-white" v-if="ancyshowLoudspeaker && !ancyshowFirstSpeak" @click="ancypause">&#xe8ef;</div>
                <div v-if="questionInfo.analysisAssetStatus==-1" class="c-flex-row c-aligni-center c-br8 c-ph16 c-pa c-translucent-balck60 c-p-t0 c-pz10 c-p-l0 c-w100 c-h">
                  <div class="iconfont c-fc-white c-fs40">&#xe963;</div>
                  <div class="c-fs24 c-fc-f2 c-ml16">该音频已被管理员删除，如有疑问请咨询客服</div>
                </div>
              </div>
            </section>
            <div class="c-fs24 c-fc-xblack c-mt14 c-text-indent50 c-ph10" v-show="(questionInfo.analysis == '' || questionInfo.analysis == ' ')&&(questionInfo.analysisRurl==''||!questionInfo.analysisRurl)">无</div>
          </div>
          <div class="c-fs22 c-flex-row c-justify-sb c-ph24 c-mt44" v-show="showAnalysis && (questionInfo.type==3||questionInfo.smallType == 3)">
            <div :class="isRight==1?'chooseKnow':'c-bg-F6F7F9 c-fc-sgray'" class="c-pv24 c-flex-column c-ww280 c-br12 c-textAlign-c" @click="chooseKnow(1)">
              <div class="c-ww48 c-hh48 c-center"><img :src="require('../../../assets/i/wap/exam/know.png')" alt=""></div>
              <div>已掌握</div>
            </div>
            <div :class="isRight==-1?'chooseKnow':'c-bg-F6F7F9 c-fc-sgray'" class="c-pv24 c-flex-column c-ww280 c-br12 c-textAlign-c" @click="chooseKnow(-1)">
              <div class="c-ww48 c-hh48 c-center"><img :src="require('../../../assets/i/wap/exam/noknow.png')" alt=""></div>
              <div>未掌握</div>
            </div>
          </div>
        </div>
        <loading-status-tem :showLoading="false" :noData="questionInfo.status==-1||!questionInfo.problem" :noDataText="'该题目已被删除,请联系管理员'"></loading-status-tem>
      </div>
      <div class="btn-wrap c-flex-row c-justify-sb c-fs24 c-pz6" v-show="questionInfo!=null">
        <div v-show="!showStart" class="btn-befor-question c-ww166 c-hh70 c-bg-white c-lh70" @click="clickPreQuestion()"><b :class="(num==1&&questionInfo&&questionInfo.type!=9)||(num==1&&questionInfo&&questionInfo.type==9&&questionInfo.smallNumber ==1)||type==2?'c-opacity50 c-fw-n':'c-fw-n'"><span class="iconfont c-fs24 chanDeg  c-mr20">&#xe635;</span>上一题</b></div>
        <div v-show="!showStart" class="btn-next-question c-ww166 c-hh70 c-bg-white c-lh70" v-if='isOver==0' @click="clickNextQuestion(1)">下一题<span class="iconfont c-fs24 c-ml20">&#xe635;</span></div>
        <div v-show="!showStart" class="btn-next-question c-ww166 c-hh70 c-bg-white c-lh70 c-fc-mblue" v-if='isOver==1' @click="clickNextQuestion(2,1)">完成<span class="iconfont c-fs24 c-ml24">&#xe635;</span></div>
      </div>
    </div>
    <clock-audio-record :showAudioRecordModal='showAudioRecordModal' @closeAudioRecordModal='closeAudioRecordModal' @uploadAudioSuccess='uploadAudioSuccess'></clock-audio-record>
    <div v-show="showModal" class="c-pz1002 c-w100 c-h c-pf c-p-l0 c-p-t0 c-flex-row c-flex-center">
      <div class="c-translucent-balck50 c-text-hidden c-pz-1 c-w100 c-h c-pa c-p-l0 c-p-t0" data-type="cancel" @click="closeModal"></div>
      <div class="c-ww540 c-bg-white c-flex-column c-pz1 c-br10">
        <div class="c-fs28 c-textAlign-c c-pv40 c-lh c-fc-xblack">反馈提示</div>
        <div class="c-fs26 c-ph40 c-pb20 c-fc-xblack">确认当前题目有误，反馈给老师！</div>
        <div class="c-fs26 c-ph40 c-pb20">具体描述:</div>
        <div class="c-fs26 c-ph40 c-pb20">
          <div class="c-ph10 iptClass c-br12">
            <textarea class="textarea needsclick c-lh42" v-model="errContent" :placeholder="'请在输入框输入具体描述'" :maxlength="50"></textarea>
            <div class="c-textAlign-r c-fs20 c-pb16 c-fc-gray">{{errContent.length}}/50</div>
          </div>
        </div>
        <footer class="c-flex-row c-fs28 c-bd-t1">
          <div class="c-hh74 c-flex-row c-flex-center c-flex-grow1 c-w0 c-fc-sblack c-bd-r1" @click="closeModal">取消</div>
          <div class="c-hh74 c-flex-row c-flex-center c-flex-grow1 c-w0 c-fc-xblue" @click="onConfirmOverLive">确定</div>
        </footer>
      </div>
    </div>
    <cj-popup v-model="showSelectModal" :closeable="true" titleClass="c-bd-b1" :title="'第'+(selectIndex*1+1)+'空'" position="bottom" round v-if="questionInfo&&questionInfo.newOption">
      <div v-for="(item,index) in questionInfo.newOption[selectIndex].options" :key="index" @click.stop="clickOption(index)" class="c-ph24 c-flex-row c-pv20 c-fs24 c-mh90">
        <div class="op-type c-ww50 c-hh50 c-brp50 c-lh50 c-textAlign-c" :class="optionClass[index]" >{{item.name}}</div>
        <div class="c-pl20 c-lh50 c-wb-ba copyNot imgInlineb c-textAlign-j problemdDom" v-html="item.content"></div>
      </div>
    </cj-popup>
  </div>
</template>

<script>
import Countdown from "@/components/templates/countdown.vue";
import VueSlider from "vue-slider-component";
import watermark from "@/components/templates/common/watermark.vue";
import { getXgplayer, destoryPlayer } from "@/utils/xgplayerJs.js";
import clockAudioRecord from "@/components/templates/clockIn/clockAudioRecord.vue";
//import ExaminationResult from "@/components/homePage/examination/examinationResult.vue";
import loadingStatusTem from "@/components/templates/common/loadingStatusTem.vue";
import { utilJs, wxUtilJs } from "@/utils/common.js"
let inputScrollTop = 0;
let serverIdImgArr = []; //上传图片的serverID
let imgData = {};
let player = null;
let playTimeControl = null;
let isCanPlay = false
let ancyPlayer = null;
let ancyplayTimeControl = null;
let moreTimeControl = null
let ancyisCanPlay = false;
let curanswerTime = 0;
let aswerControl;
export default {
  name: "ExaminationAnswer",
  components: {
    VueSlider,
    Countdown,
    loadingStatusTem,
    watermark,
    clockAudioRecord
    //  ExaminationResult
  },
  props: [],
  data() {
    return {
      wHeight:
        window.innerHeight ||
        document.documentElement.clientHeight ||
        document.body.clientHeight,
      theme: localStorage.getItem("colorName") ? localStorage.getItem("colorName") : 'mb5_default',
      examinationInfo: null,
      testRes: null,
      answerCardList: [],
      review: '',
      cfg: JSON.parse(localStorage.getItem("cfg")),
      hasCommit: false,
      isOver: 0,
      showModal:false,
      libraryId: -1,
      type: '',
      paperDetailId: -1,
      examId: -1,
      isRelevance: '', //来自关联
      num: 1,
      showStart: false,
      questionInfo: null,
      optionsList: [],
      answerList: [false, false, false, false, false, false, false, false, false, false],
      totalNum: 1, //总题数
      isTimeUp: false,
      showAnalysis: false, //是否已经展示解析
      userAnswer: '',
      optionClass: [],
      examType: 0,
      essayAnswer: "", //问答题用户回答的内容
      fbAnswer: null, //填空题用户回答的内容
      uploadImgList: [], //需要上传的图片
      isWeiXin: true,
      isFeedback: 0,
      clickShow: false,
      clickFlag: true,
      showmoTest: true,
      leftNum: 0, //剩余题目数
      leftSmallNum: 0, //剩余小题数
      leftNumFlag: false, //交卷题目数展示
      examDetailId: '', //题目id
      beforeExamDetailId: '', //上一题id
      nextExamDetailId: '', //下一题id
      showFirstSpeak: true,
      showLoudspeaker: false,
      isPcWechat: false,
      ttId: "",
      tpId: "",
      tlId: "",
      progress: "",
      processStyle: {
        "background-color": "#fff"
      },
      railStyle: {
        "background": "rgba(255,255,255,0.3)"
      },
      dotOptions: {
        style: {
          border: "1px solid #fff",
        },
      }, //进度条组件样式
      dragFlag: false, //进度拖拽
      audioPlayTime: 0,
      playtime: '00:00:00',
      playtotalTime: '00:00:00',
      duration: 0,
      playing: false,
      ancyshowFirstSpeak: true,
      ancyshowLoudspeaker: false,
      ancydragFlag: false, //进度拖拽
      ancyaudioPlayTime:0,
      ancyplaytime: '00:00:00',
      ancyplaytotalTime: '00:00:00',
      ancyduration:0,
      ancyPlaying:false,
      questionType: 0,
      rId: 0,
      answerTime: "00:00:00",
      isExperience: 0,
      exNum: 1,
      cfrom: global.ckFrom,
      fbAnswerStyle: [],
      showExamWatermark: false,
      smallNumber: 1,
      isRight:-1,
      playAduioSrc:'',
      showAudioRecordModal:false,
      uploadAudioList:[],
      examWatermarkConfig: JSON.parse(localStorage.getItem("examWatermarkConfig")) || '',
      isCollect:0,
      errContent:'',
      selectIndex:0, // 获取其属性
      showSelectModal:false
    };
  },
  created() {
    utilJs.appShare(this);
  },
  activated() {
  },
  destroyed() {
    if (player) {
      destoryPlayer(player);
      player = null;
      // document.querySelector("#liveVideoIntroParent").innerHTML = "";
    }
    if (ancyPlayer) {
      destoryPlayer(ancyPlayer);
      ancyPlayer = null;
    }
    this.setProgress();
  },
  mounted() {
    setDocumentTitle("答题");// eslint-disable-line
    this.isWeiXin = utilJs.isWeiXin();
    //  this.examId = -1;
    this.libraryId = this.$route.query.libraryId;
    this.isCollect = this.$route.query.isCollect || 0;
    this.ttId = this.$route.query.ttId || "";
    this.tpId = this.$route.query.tpId || ""; //环节id
    this.tlId = this.$route.query.tlId || "";
    this.progress = this.$route.query.progress || "";
    this.isExperience = this.$route.query.isExperience || 0;
    this.exNum = this.$route.query.exNum || 0;
    this.num = Number(this.$route.query.goOnNum);
    this.type = this.$route.query.type
    this.smallNumber = 1;//this.$route.query.goOnNum;
    this.questionType = this.$route.query.questionType
    this.rId = this.$route.query.rId
    this.isRelevance = this.$route.query.isRelevance || '';
    this.isPcWechat = utilJs.isWeiXin() && !utilJs.isMobileUserAgent();
    this.testRes = null;
    this.isRight = -1
    this.answerCardList = [];
    this.uploadAudioList = []
    this.showFirstSpeak = true
    this.showLoudspeaker = false
    this.ancyshowFirstSpeak = true
    this.ancyshowLoudspeaker = false
    this.ancyaudioPlayTime = 0
    this.playAduioSrc = ''
    this.showAudioRecordModal = false;
    this.answerList = [false, false, false, false, false, false, false, false, false, false];
    this.optionClass = ['noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose'];
    this.essayAnswer = "";
    this.showAnalysis = false;
    this.showExamWatermark = localStorage.getItem('enableExamWatermark') && localStorage.getItem('enableExamWatermark') == '1' ? true : false;
    curanswerTime = 0;
    let $this = this;
    //  if(!this.showResult) {
    //获取阿里云签名，除了微信浏览器以外
    if (!utilJs.isWeiXin()) {
      utilJs.getAliSign(`${global.apiurl}imageSign`, res => {
        imgData = res;
      });
    }
    if ($this.num == 1) {
      this.getQuestion();
    } else {
      $this.showStart = false;
      $this.getQuestion();
    }
  },
  methods: {
     // 删除音频
     clickDelAudio(index) {
      if (document.getElementById("audioSelf")) {
        this.playAduioSrc = "";
        document.getElementById("audioSelf").src = this.playAduioSrc;
        document.getElementById("audioSelf").pause();
      }
      this.uploadAudioList.splice(index, 1);
    },
    //点击开始播放音频
    clickPlayAudio(audioUrl) {
      let audio = document.getElementById("audioSelf");
      if (this.playAduioSrc == audioUrl) {
        this.playAduioSrc = "";
        document.getElementById("audioSelf").src = this.playAduioSrc;
        return;
      }
      this.playAduioSrc = audioUrl;

      if (this.playAduioSrc && this.playAduioSrc.includes("http")) {
        document.getElementById("audioSelf").src = this.playAduioSrc;
        audio.play();
      }
    },

    //监听音频播放结束执行的内容
    playAudioSelfEnd() {
      this.playAduioSrc = "";
      document.getElementById("audioSelf").src = this.playAduioSrc;
    },
    clickAddAudio() {
      this.playAduioSrc = "";
      document.getElementById("audioSelf").src = this.playAduioSrc;
      if (utilJs.getAppVersion() > 0) {
        this.initAppRecordEvent();
        utilJs.sendDataToAppNew('record', 'appAudioStartRecord');
        return;
      }
      this.showAudioRecordModal = true;
    },
    //关闭录音弹窗
    closeAudioRecordModal(state) {
      if (state == 1) {
        this.showAudioRecordModal = false;
      }
    },
    //音频上传成功
    uploadAudioSuccess(audioContent, state) {
      if (state == 1) {
        this.showAudioRecordModal = false;
      }
      let audioItem = {
        url: audioContent.content,
        time: audioContent.time
      };
      this.uploadAudioList.push(audioItem);
      console.log(audioItem, 444444444444)
    },
    initAppRecordEvent() {
      window['cjAppAudioRecordResult'] = this.appRecordResult;
    },
    //app录音结果回调
    appRecordResult(resKey, time) {
      console.log('*******appRecordResult***', resKey, time)
      let resUrl = `https://qnoss.ckjr001.com/${resKey}`;
      let info = {
        content: resUrl,
        time:time
      }
      this.uploadAudioSuccess(info);
    },
    //
    aswerTimeControl() {
      //答题时间计时器
      let that = this;
      aswerControl = setInterval(function () {
        curanswerTime++;
        that.answerTime = that.timeToStr(curanswerTime);
      }, 1000);
    },
    // 记录播放进度
    setProgress: function () {
      let data = {
        ttId: this.ttId, //营期ID
        tpId: this.tpId, //环节ID
        tlId: this.tlId, //课时ID
        ratio: this.progress, //完成进度0-100
        duration: 0,
      }
      utilJs.postMethod(`${global.apiurl}k12/trainings/progress`, data, res => {
      });
    },
    //点击回答图片
    clickAnswerPic(event) {
      if (this.uploadImgList.length >= 9) {
        this.$showCjToast({
          text: "图片最多只能传9张",
          type: "warn",
          time: 1500
        });
        return;
      };
      if (this.isWeiXin) {
        wxUtilJs.chooseImage({
          count: 9, // 默认9
          sizeType: ["compressed"], // 可以指定是原图还是压缩图，默认二者都有
          sourceType: ["album", "camera"] // 可以指定来源是相册还是相机，默认二者都有
        }).then(localIds => {
          this.$loading.show({
            text: "上传中..."
          });
          serverIdImgArr = [];
          //获取剩余能传多少张图片，若已选的图片数量大于剩余数。则只传剩余数量的图片
          let residueLength = 9 - this.uploadImgList.length;
          if (localIds.length > residueLength) {
            localIds.length = residueLength;
          }
          this.wxUploadImg(localIds, localIds.length - 1);
        });
      } else {
        utilJs.imgUpload(event.target.files, imgData, 'exam', res => {
          let urlObj = {
            url: res
          };
          this.uploadImgList.push(urlObj)
        }, fRes => {});
      }
    },

    //上传图片到微信-----IOS不能一次性传多张，只好递归传
    wxUploadImg(localIds, localIdsLength) {
      wxUtilJs
        .uploadImage({
          localId: localIds[localIdsLength]
        }, true)
        .then(res => {
          serverIdImgArr.push(res);
          if (localIdsLength > 0) {
            this.wxUploadImg(localIds, --localIdsLength);
          } else {
            this.syncUploadPic(serverIdImgArr);
          }
        });
    },

    //上传图片到服务器
    syncUploadPic(serverIdArr) {
      utilJs.postMethod(global.apiurl + "signCard/downWxImg ", {
        serverId: JSON.stringify(serverIdArr),
        mediaType: 2
      },
        res => {
          this.$loading.hide();
          for (let key of res) {
            if (this.uploadImgList.length >= 9) {
              break;
            }
            let urlObj = {
              url: key
            };
            this.uploadImgList.push(urlObj)
          }
        },
        failRes => {
          this.$loading.hide();
        }
      );
    },
    //删除上传的图片
    delUploadImage(index) {
      this.uploadImgList.splice(index, 1);
    },

    //点击图片放大预览
    clickPreviewImage(imgUrl) {
      if (!imgUrl) {
        return;
      }
      let imgArr = [];
      for (let key of this.uploadImgList) {
        imgArr.push(key.url);
      }
      wxUtilJs.previewImage({
        current: imgUrl, // 当前显示图片的http链接
        urls: imgArr // 需要预览的图片http链接列表
      });
    },
    //IOS微信6.7以上版本会导致输入法收起的时候，键盘没收起，需要手动滚下屏幕
    inputFocus() {
      if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
        inputScrollTop = document.documentElement.scrollTop || document.body.scrollTop;
      }
    },
    inputBlur() {
      if (navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) {
        setTimeout(() => {
          document.body.scrollTop = inputScrollTop - 1 || 0;
        });
      }
    },
    setAnalysisStyle(userAnswer, rightAnswer) {
      var userAnswerT = userAnswer == '正确' ? 'A' : (userAnswer == '错误' ? 'B' : userAnswer);
      var rightAnswerT = rightAnswer == '1' ? 'A' : (rightAnswer == '-1' ? 'B' : rightAnswer);
      if (this.questionInfo.type == 1 || this.questionInfo.type == 2 || this.questionInfo.type == 4 || this.questionInfo.smallType == 1 || this.questionInfo.smallType == 2 || this.questionInfo.smallType == 4) {
        let lettersT = 'ABCDEFGHIJ';
        let userArr = [];
        let rightArr = [];
        let aIndex = -1;
        let rIndex = -1;

        userArr = userAnswerT.split('');
        rightArr = rightAnswerT.split('');

        for (let i = 0; i < userArr.length; i++) {
          aIndex = lettersT.indexOf(userArr[i]);
          this.$set(this.optionClass, aIndex, 'analysisUser');
          if (rightAnswerT.indexOf(userArr[i]) == -1) {
            this.optionsList[aIndex].type = "X"
          }
        }
        for (let i = 0; i < rightArr.length; i++) {
          rIndex = lettersT.indexOf(rightArr[i]);
          this.$set(this.optionClass, rIndex, 'analysisRight');
        }
      } else if (this.questionInfo.type == 5 || this.questionInfo.smallType == 5) {
        let fbRightAnswer = JSON.parse(JSON.stringify(this.questionInfo.answer));
        let hasRightAnswer = false;
        for (let i = 0; i < this.fbAnswer.length; i++) {
          if (this.questionInfo.enableDisorderMatch == 1) {//是否是乱序模式
              for (let j = 0; j < fbRightAnswer.length; j++) {
                  let answerTextArr = []
                  if (fbRightAnswer[j].value.indexOf(";") > -1) {
                    answerTextArr = fbRightAnswer[j].value.split(";")
                  } else {
                    answerTextArr.push(fbRightAnswer[j].value)
                  }
                  for (let k = 0; k < answerTextArr.length; k++) {
                      if (this.fbAnswer[i].value.trim() == answerTextArr[k].trim()) {
                        hasRightAnswer = true;
                        fbRightAnswer.splice(j, 1);
                        break;
                      }
                    }
              }
            } else {
                  let answerTextArr = []
                  if (fbRightAnswer[i].value.indexOf(";") > -1) {
                    answerTextArr = fbRightAnswer[i].value.split(";")
                  } else {
                    answerTextArr.push(fbRightAnswer[i].value)
                  }
                  for (let k = 0; k < answerTextArr.length; k++) {
                    if (this.fbAnswer[i].value.trim() == answerTextArr[k].trim()) {
                      hasRightAnswer = true;
                      break;
                    }
                  }
            }
          if (hasRightAnswer) {
            this.$set(this.fbAnswerStyle, i, 'right');
          } else {
            this.$set(this.fbAnswerStyle, i, 'wrong');
          }
          hasRightAnswer = false;
        }
      }
    },
    clickOption(index) {
      if (this.questionInfo.smallType == 11 || this.questionInfo.type == 11 || this.questionInfo.type == 1 || this.questionInfo.type == 4 || this.questionInfo.smallType == 1 || this.questionInfo.smallType == 4) {
        if (this.showAnalysis == false) {
          this.answerList = [false, false, false, false, false, false, false, false, false, false];
          this.optionClass = ['noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose'];
          this.$set(this.answerList, index, true);
          this.$set(this.optionClass, index, 'choose');
          console.log(this.answerList, this.optionClass)
          if (this.questionInfo.smallType == 11 || this.questionInfo.type == 11) {
            let lettersT = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'];
            let btn = document.getElementsByClassName('selectClass')
            btn[this.selectIndex].innerHTML = lettersT[index]
            this.showSelectModal = false
          }
          this.userAnswer = this.transAnswerText();
          if (this.questionInfo.smallType != 11 && this.questionInfo.type != 11) {
            this.setAnalysisStyle(this.userAnswer, this.questionInfo.answer);
            this.showAnalysis = true;
          }
        }
      } else if (this.questionInfo.type == 2 || this.questionInfo.smallType == 2) {
        if (this.showAnalysis == false) {
          this.$set(this.answerList, index, !this.answerList[index]);
          if (this.optionClass[index] == 'choose') {
            this.$set(this.optionClass, index, 'noChoose');
          } else if (this.optionClass[index] == 'noChoose') {
            this.$set(this.optionClass, index, 'choose');
          }
          this.clickShow = true
        }
        //      this.answerList[index] = !this.answerList[index];
      }
    },
    hideCountdown() {
      if (this.showStart == true) {
        this.showStart = false;
        this.getQuestion();
      }
    },
    timeToStr(timeSecond) {
      //将秒转化为00:00:00格式
      let hour =
        Math.floor(timeSecond / 3600) >= 10
          ? Math.floor(timeSecond / 3600)
          : "0" + Math.floor(timeSecond / 3600);
      let minute =
        Math.floor((timeSecond % 3600) / 60) >= 10
          ? Math.floor((timeSecond % 3600) / 60)
          : "0" + Math.floor((timeSecond % 3600) / 60);
      let second =
        Math.floor(timeSecond % 60) >= 10
          ? Math.floor(timeSecond % 60)
          : "0" + Math.floor(timeSecond % 60);
      return hour + ":" + minute + ":" + second;
    },
    transAnswerText() {
      var answerText = '';
      let lettersT = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'];
      if (this.questionInfo.type == 1 || this.questionInfo.type == 2 || this.questionInfo.smallType == 1 || this.questionInfo.smallType == 2) {
        for (let i = 0; i < this.optionsList.length; i++) {
          if (this.answerList[i] == true) {
            answerText = answerText + lettersT[i];
          }
        }
      } else if (this.questionInfo.type == 4 || this.questionInfo.smallType == 4) {
        if (this.answerList[0] == true) {
          answerText = "正确";
        } else if (this.answerList[1] == true) {
          answerText = "错误";
        }
      } else if (this.questionInfo.type == 3 || this.questionInfo.smallType == 3) {
        answerText = this.essayAnswer;
      } else if (this.questionInfo.type == 5 || this.questionInfo.smallType == 5) {
        answerText = this.fbAnswer;
      } else if (this.questionInfo.type == 11) {
        if (this.leftNumFlag == true) {
          answerText = this.questionInfo.userAnswer
        } else {
          var myselect = document.getElementsByClassName("selectClass")
          var index = []
          for (let i = 0;i < myselect.length;i++) {
            let option = {value: myselect[i].innerHTML == (i * 1 + 1) + '. 点击答题' ? '' : myselect[i].innerHTML, key: i, }
            index.push( option);
          }
          answerText = index
        }
      }
      return answerText
    },
    //上一题保存数据
    preSaveQuestion() {
      let answerText = '';
      let $this = this;
      answerText = this.transAnswerText();
        this.isTimeUp = false;
        let answerCommit = {
          questionId: $this.questionInfo.questionId,
          examMainId: $this.questionInfo.examMainId,
          options: answerText,
          examOver: 0,
          examDetailId: $this.nextExamDetailId ? $this.nextExamDetailId : '',
          totalTime: curanswerTime,
        };
        if ($this.questionInfo.type == 4 || $this.questionInfo.smallType == 4) {
          if (answerCommit.options == '正确') {
            answerCommit.options = 1;
          } else if (answerCommit.options == '错误') {
            answerCommit.options = -1;
          }
        }
        if (($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) && $this.uploadImgList.length > 0) {
          answerCommit.imgArr = $this.uploadImgList;
        }
        if (($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) && $this.uploadAudioList.length > 0) {
          answerCommit.audioArr = $this.uploadAudioList;
        }
        if ($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) {
          answerCommit.isRight = $this.isRight
        }
        if ($this.questionInfo.type == 5 || $this.questionInfo.smallType == 5) {
          answerCommit.options = $this.fbAnswer;
        }
        // if ($this.isOver != 1) {
          utilJs.postMethod(global.apiurl + 'itemBank/saveAnswer', answerCommit, function (res) {
            $this.clickFlag = true
            $this.isOver = 0;
            // $this.num = $this.num == 1 ? $this.num : parseInt($this.num) - 1;parseInt($this.questionInfo.hasSmallNum)
            if ($this.questionInfo.type == 9) {
              if (parseInt($this.questionInfo.smallNumber) == 1) {
                $this.num = parseInt($this.num) - 1
              } else {
                $this.smallNumber = parseInt($this.questionInfo.smallNumber) - 1
              }
            } else {
              $this.num = parseInt($this.num) - 1
              $this.smallNumber = 1;
            }
            $this.examDetailId = $this.beforeExamDetailId
            clearInterval(aswerControl);
            $this.getQuestion();
          },
          failRes => {
            $this.clickFlag = true
          });
        // } else {
        //   $this.clickFlag = true
        //   $this.isOver = 0;
        //   $this.num = $this.num == 1 ? $this.num : parseInt($this.num) - 1;
        //   $this.examDetailId = $this.beforeExamDetailId
        //   clearInterval(aswerControl);
        //   $this.getQuestion();
        // }
      // }
    },
    chooseKnow(isRight) {
      this.isRight = isRight
      console.log(this.isRight)
    },
    clickPreQuestion() {
      //进入上一题
      let $this = this;
      if ((($this.num == 1 && $this.questionInfo && $this.questionInfo.type != 9) || ($this.num == 1 && $this.questionInfo && $this.questionInfo.smallNumber == 1)) || $this.type == 2) {
        return
      }
      if (!$this.clickFlag) {
        return
      }
      $this.clickFlag = false
      // $this.showAnalysis = true;
      $this.preSaveQuestion();
    },
    showMoreQue() {
      this.moreQue = !this.moreQue
    },
    clickNextQuestion(type, selfClick) {
      let answerText = '';
      let $this = this;
      answerText = $this.transAnswerText();
      $this.isTimeUp = false;
        let answerCommit = {
          questionId: $this.questionInfo.questionId,
          examMainId: $this.questionInfo.examMainId,
          options: answerText,
          examOver: $this.isOver,
          totalTime: curanswerTime
        };
        if ($this.questionInfo.type == 4 || $this.questionInfo.smallType == 4) {
          if (answerCommit.options == '正确') {
            answerCommit.options = 1;
          } else if (answerCommit.options == '错误') {
            answerCommit.options = -1;
          }
        }
        if (($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) && $this.uploadImgList.length > 0) {
          answerCommit.imgArr = $this.uploadImgList;
        }
        if (($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) && $this.uploadAudioList.length > 0) {
          answerCommit.audioArr = $this.uploadAudioList;
        }
        if ($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) {
          answerCommit.isRight = $this.isRight
        }
        if ($this.questionInfo.type == 5 || $this.questionInfo.smallType == 5 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 5)) {
          answerCommit.options = $this.fbAnswer;
        }
        let fbComplete = false;
        if (this.questionInfo.type == 5 || this.questionInfo.smallType == 5) {
          this.fbAnswer.forEach(item => {
            if (item.value.trim() == "") {
              fbComplete = true;
            }
          })
        }
        this.userAnswer = this.transAnswerText();
        if (this.questionInfo.type == 11) {
          this.userAnswer.forEach(item => {
            if (item.value.trim() == "") {
              fbComplete = true;
            }
          })
        }
        if (type != 1 && selfClick == 1) {
          $this.hasCommit = true
          $this.$cjConfirm({
            title: '完成提示', //
            titleCenter: true, //标题是否居中type == 3 ? '确定交卷?' : '恭喜你完成练习！1'
            message:
            $this.questionInfo.unFinished == 0 ? '答题完毕，确认交卷！' : ($this.leftNumFlag ? '您还有' + Number($this.questionInfo.unFinished) + '道题未作答，是否继续交卷' :
            (answerText == '' || fbComplete ? '您还有' + Number($this.questionInfo.unFinished) + '道题未作答，是否继续交卷' :
            (Number($this.questionInfo.unFinished) - 1 != 0 ? '您还有' + (Number($this.questionInfo.unFinished) - 1) + '道题未作答，是否继续交卷' :
            '答题完毕，确认交卷！'))), //弹窗内容,
            messageCenter: true, //内容是否居中
            showMasker: true, //是否显示透明背景
            clickCloseModal: false, //是否点击透明背景关闭弹窗
            showCancelButton: true, //是否显示取消按钮
            cancelButtonText: '', //取消按钮文本
            confirmButtonText: '', //确认按钮文本
            onConfirm() {
              $this.hasCommit = false
              clearInterval(playTimeControl);
              clearInterval(aswerControl);
              clearInterval(moreTimeControl);
              $this.continueQue(type, answerCommit)
            }, //确认事件回调
            onCancel() {
              $this.hasCommit = false; return false
            }, //取消事件回调
          })
        } else {
          // this.hasCommit = false
          clearInterval(playTimeControl);
          clearInterval(aswerControl);
          clearInterval(moreTimeControl);
          $this.continueQue(type, answerCommit)
        }
      // }
    },
    continueQue(type, answerCommit) {
      let $this = this
      if (type == 3) {
        answerCommit.examOver = 1;
      }
      if (this.hasCommit == false) {
        this.hasCommit = true;
        // if ($this.nextExamDetailId) {
        //   $this.num = parseInt($this.num) + 1
        //   $this.examDetailId = $this.nextExamDetailId ? $this.nextExamDetailId : ''
        //   $this.getQuestion();
        // } else {
          utilJs.postMethod(global.apiurl + 'itemBank/saveAnswer', answerCommit, function (res) {
            if (!$this.nextExamDetailId) {
              $this.showAnalysis = false;
            }
            if (type == 1) { //进入下一题
              // $this.num = parseInt($this.num) + 1
              if ($this.questionInfo.type == 9) {
                $this.isOver = (($this.num == $this.questionInfo.totalNum) && ($this.questionInfo.hasSmallNum == $this.questionInfo.smallNumber)) ? 1 : 0;
                if (parseInt($this.questionInfo.smallNumber) == parseInt($this.questionInfo.hasSmallNum)) {
                  $this.num = parseInt($this.num) + 1
                }
                $this.smallNumber = $this.questionInfo.smallNumber < $this.questionInfo.hasSmallNum ? parseInt($this.questionInfo.smallNumber) + 1 : 1;
                console.log($this.smallNumber, 1111111111111111111111)
              } else {
                $this.isOver = $this.num < $this.questionInfo.totalNum ? 0 : 1;
                $this.num = parseInt($this.num) + 1
                $this.smallNumber = 1;
              }
              $this.examDetailId = $this.nextExamDetailId ? $this.nextExamDetailId : ''
              $this.progress = Math.round((($this.questionInfo.rightNum + $this.questionInfo.errorNum) / $this.questionInfo.totalNum) * 100);
              $this.setProgress()
              if (Number($this.isExperience) == 1 && $this.num > Number($this.exNum)) {
                $this.showPayConfirmTip()
                return;
              }
              $this.getQuestion();
            } else { //最后一题或者提前交卷
              clearInterval(playTimeControl);
              clearInterval(ancyplayTimeControl);
              clearInterval(moreTimeControl);
              $this.progress = Math.round(100);
              $this.setProgress()
              if (Number($this.isExperience) == 1 && $this.num > Number($this.exNum)) {
                $this.showPayConfirmTip()
                return;
              }
              $this.$routerGo($this, "replace", {
                path: "/homePage/itemBank/questionResult",
                query: {
                  libraryId: $this.libraryId,
                  type: $this.type,
                  ttId: $this.ttId,
                  tpId: $this.tpId,
                  tlId: $this.tlId,
                  progress: $this.progress,
                  isFromPractice:$this.$route.query.isFromPractice || '',
                  examMainId: $this.questionInfo.examMainId
                }
              });
            }
          },
            failRes => {
              $this.hasCommit = false;
            }

          );
        // }
      }
    },
    showPayConfirmTip() {
      this.$cjConfirm({
        title: '提示',
        message: "可体验" + this.exNum + '题，想继续答题，可付费该练习',
        confirmButtonText:'立即付费',
        onConfirm:() => {
          let querys = {
          extId: this.libraryId,
          ckFrom: this.cfrom.itemBank,
          isFromInvite: 0,
          cId: -1,
        };
        if (this.$route.query.pId) {
          querys.pId = this.$route.query.pId
        }
        this.$routerGo(this, "replace", {
          path: "/homePage/course/coursePay",
          query: querys
        });
        },
        onCancel:() => {
          this.$router.go(-1);
        }
      })
    },
    initQPlayer() {
      let videoObj = {
        videoMp4: this.questionInfo.resourceUrl,
        videoM3U8: this.questionInfo.resourceUrl,
        autoplay: false,
        fluid: false,
        isCssFullScreen: true,
        poster: require("../../../../public/i/wap/index/poster.png")
      };
      player = getXgplayer("liveVideoIntroParent", videoObj);
      player.on('ready', () => {
        if (document.querySelector(".xgplayer-start")) {
          document.querySelector(".xgplayer-start").style.zIndex = 99;
        }
      })
      player.on("play", () => {
        if (ancyPlayer) {
          ancyPlayer.pause();
        }
        if (document.getElementById("ancyaudio").src != '') {
          this.ancyshowFirstSpeak = true
          document.getElementById('ancyaudio').pause();
        }
      });

      if (document.querySelector(".xgplayer-start")) {
        document.querySelector(".xgplayer-start").style.zIndex = '99';
      }
    },
    initQPlayerAncy() {
      let videoObj = {
        videoMp4: this.questionInfo.analysisRurl,
        videoM3U8: this.questionInfo.analysisRurl,
        autoplay: false,
        fluid: false,
        isCssFullScreen: true,
        poster: require("../../../../public/i/wap/index/poster.png")
      };
      console.log(444444444444444444444)
      ancyPlayer = getXgplayer("ancyVideoIntroParent", videoObj);
      ancyPlayer.on('ready', () => {
        if (document.querySelector(".xgplayer-start")) {
          document.querySelector(".xgplayer-start").style.zIndex = 99;
        }
      })
      if (document.querySelector(".xgplayer-start")) {
        document.querySelector(".xgplayer-start").style.zIndex = '99';
      }
      ancyPlayer.on("play", () => {
        if (player) {
          player.pause();
        }
        if (document.getElementById("audio").src != '') {
          document.getElementById('audio').pause();
          this.showFirstSpeak = true
        }
      });
    },
    Videoplay() {
      if (this.questionInfo.resourceUrl) {
        player.play()
        this.playing = true
      }
    },
    VideoplayAncy() {
      if (this.questionInfo.analysisRurl) {
        ancyPlayer.play()
        this.ancyPlaying = true
      }
    },
    clickDesc(e) {
      if (e.target.tagName == 'IMG' && e.target.src) {
        wxUtilJs.previewImage({
          current: e.target.src, // 当前显示图片的http链接
          urls: [e.target.src] // 需要预览的图片http链接列表
        });
      }
    },
    getQuestion() {
      this.answerList = [false, false, false, false, false, false, false, false, false, false];
      this.optionClass = ['noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose'];
      this.optionsList = [];
      this.questionInfo = null;
      this.fbAnswer = null;
      this.uploadImgList = [];
      this.essayAnswer = "";
      this.moreQue = false
      this.clickShow = false
      this.showFirstSpeak = true;
      this.showLoudspeaker = false;
      this.audioPlayTime = 0;
      this.playtime = '00:00:00';
      this.playtotalTime = '00:00:00';
      this.duration = 0;
      this.isRight = -1
      this.playing = false
      this.ancyshowFirstSpeak = true
      this.ancyshowLoudspeaker = false;
      this.ancyaudioPlayTime = 0;
      this.ancyplaytime = '00:00:00';
      this.ancyplaytotalTime = '00:00:00';
      this.ancyduration = 0;
      this.ancyPlaying = false;
      this.fbAnswerStyle = [];
      this.userAnswer = '',
      this.uploadAudioList = []
      this.showSelectModal = false
      this.selectIndex = 0
      this.showAnalysis = false;
      clearInterval(ancyplayTimeControl);
      clearInterval(playTimeControl);
      clearInterval(moreTimeControl);
      let $this = this;
      this.$loading.show({
        text: ""
      });
      if (!document.getElementById('audio').ended) {
        document.getElementById("audio").pause();
      }
      if (!document.getElementById('ancyaudio').ended) {
        document.getElementById("ancyaudio").pause();
      }
      if (this.num != 1) { //防止答题过程中手动刷新页面，又要从第一题开始做答
        let querys = {
          libraryId: this.libraryId,
          goOnNum: this.num,
          type: this.type,
          rId:this.rId,
          questionType:this.questionType,
          isFromPractice:this.$route.query.isFromPractice || '',
        }
        if (Number(this.isExperience) == 1) {
          querys.isExperience = 1;
          querys.exNum = this.exNum;
        }
        if (this.$route.query.pId) {
          querys.pId = this.$route.query.pId
        }
        this.$routerGo(this, "replace", {
          path: "/homePage/itemBank/questionAnswer",
          query: querys
        });
      }
      let questionUrl = '';
      questionUrl = global.apiurl + 'itemBank/examProcess?libraryId=' + this.libraryId + '&type=' + this.type + '&number=' + this.num + '&examDetailId=' + this.examDetailId + '&smallNumber=' + this.smallNumber;
      if (this.type == 3 || this.type == 5) {
        questionUrl = questionUrl + '&rId=' + this.rId
      } else if (this.type == 4 || this.type == 6 || this.type == 8) {
        questionUrl = questionUrl + '&questionType=' + this.questionType
      }
      if (Number(this.isExperience) == 1) {
        questionUrl = questionUrl + '&isExperience=1'
      }
      utilJs.getMethod(questionUrl, function (res) {
        if (JSON.stringify(res) === '[]' ) {
          $this.$routerGo($this, "replace", {
            path: JSON.stringify(res) === '[]' ? `/error/emptyPage?from=exam&info=练习题目数量不足，请联系管理人员！` : `/error/emptyPage?from=exam&info=练习题目为空，请联系管理人员！`
          });
        }
        // if (!res.problem) {
        //   $this.$routerGo($this, "replace", {
        //     path: `/error/emptyPage?from=exam&info=练习题目未设置完全，请联系管理人员！`
        //   });
        // }
        if (typeof (res) == 'string') {
          $this.$loading.hide();
          $this.$showCjToast({
            text: res,
            type: 'warn',
            time: 3000
          });
          $this.$router.go(-1);
          return
        }
        $this.$loading.hide();
        $this.hasCommit = false;
        $this.questionInfo = res;
        $this.totalNum = res.totalNum
        $this.isRight = res.isRight
        $this.beforeExamDetailId = res.beforeExamDetailId == 0 ? res.beforeExamDetailId : JSON.stringify(res.beforeExamDetailId)
        $this.nextExamDetailId = res.nextExamDetailId == 0 ? res.nextExamDetailId : JSON.stringify(res.nextExamDetailId)
        $this.isFeedback = res.isFeedback//  1：已反馈  0未反馈
        $this.errContent = ''
        // $this.isOver = Number($this.num) < $this.totalNum ? 0 : 1;
        $this.uploadAudioList = res.audioArr
        curanswerTime = res.totalTime;
        $this.aswerTimeControl();
        $this.wechatShare();
        if (player) {
          destoryPlayer(player);
          player = null;
          // document.querySelector("#liveVideoIntroParent").innerHTML = "";
        }
        if (ancyPlayer) {
          destoryPlayer(ancyPlayer);
          ancyPlayer = null;
          // document.querySelector("#liveVideoIntroParent").innerHTML = "";
        }
        if ($this.questionInfo.status == 1 && $this.questionInfo.resourceUrl != '' && $this.questionInfo.resourceType == 1) {
          $this.$nextTick(function () {
            $this.initQPlayer();
          })
        }
        if ($this.questionInfo.status == 1 && $this.questionInfo.analysisRurl && $this.questionInfo.analysisRurl != '' && $this.questionInfo.analysisRtype == 1) {
          $this.$nextTick(function () {
            $this.initQPlayerAncy();
          })
        }
        let audio = document.getElementById("audio");
        audio.src = '';
        if ($this.questionInfo.resourceUrl != '' && $this.questionInfo.resourceType == 2) {
          // $this.$nextTick(function () {
          audio.src = $this.questionInfo.resourceUrl;
          document.getElementById('audio').removeEventListener('timeupdate', $this.audioTimeUpdate);
          document.getElementById('audio').removeEventListener('canplay', $this.audioCanPlay);
          document.getElementById('audio').addEventListener('timeupdate', $this.audioTimeUpdate);
          document.getElementById('audio').addEventListener('canplay', $this.audioCanPlay);
          // })
        }
        let ancyaudio = document.getElementById("ancyaudio");
        ancyaudio.src = '';
        if ($this.questionInfo.analysisRurl != '' && $this.questionInfo.analysisRtype == 2) {
          // $this.$nextTick(function () {
          ancyaudio.src = $this.questionInfo.analysisRurl;
          document.getElementById('ancyaudio').removeEventListener('timeupdate', $this.ancyAudioTimeUpdate);
          document.getElementById('ancyaudio').removeEventListener('canplay', $this.ancyAudioCanPlay);
          document.getElementById('ancyaudio').addEventListener('timeupdate', $this.ancyAudioTimeUpdate);
          document.getElementById('ancyaudio').addEventListener('canplay', $this.ancyAudioCanPlay);
          // })
        }
        if ($this.questionInfo.type == 4 || $this.questionInfo.smallType == 4) {
          $this.questionInfo.optionA = "正确";
          $this.questionInfo.optionB = "错误";
        }
        if ($this.questionInfo.type == 1 || $this.questionInfo.type == 2 || $this.questionInfo.type == 11 || $this.questionInfo.type == 4 || $this.questionInfo.smallType == 1 || $this.questionInfo.smallType == 2 || $this.questionInfo.smallType == 4) {
          const optionArr = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'];
          for (let i = 0; i < 10; i++) {
            let optionSty = `option${optionArr[i]}`;
            if ($this.questionInfo[optionSty] != '' && $this.questionInfo[optionSty] != null) {
              $this.optionsList.push({ type: optionArr[i], name: $this.questionInfo[optionSty] });
            }
          }
        }
        if ($this.questionInfo.userAnswer == '' || $this.questionInfo.userAnswer == null || ($this.questionInfo.userAnswer.length == 1 && $this.questionInfo.userAnswer[0].value == '')) {
          $this.leftNumFlag = false
        } else {
          if (Array.isArray($this.questionInfo.userAnswer) && $this.questionInfo.userAnswer.length > 0) {
            for (let i = 0;i < $this.questionInfo.userAnswer.length;i++) {
              if ($this.questionInfo.userAnswer[i].value.trim() == "") {
                $this.leftNumFlag = false
                break;
              } else {
                $this.leftNumFlag = true
              }
            }
          } else if ($this.questionInfo.userAnswer != "") {
            $this.leftNumFlag = true
          }
        }
        if ($this.questionInfo.type == 11) {
          let str = $this.questionInfo.problem;
          // match 方法返回匹配的数组
          let res = str.match(/\{\{[\d}]*?\}\}/g);
          let count = !res ? 0 : res.length;
          if ($this.leftNumFlag == false && ($this.questionInfo.userAnswer == null || $this.questionInfo.userAnswer || $this.questionInfo.userAnswer.length == 0)) {
              $this.questionInfo.userAnswer = []
              for (let k = 0; k < count; k++) {
                $this.questionInfo.userAnswer[k] = {value : "", key : ""}
              }
          }
          if ($this.leftNumFlag == true) {
            for (let i = 0; i < count; i++) {
              $this.questionInfo.problem = $this.questionInfo.problem.replace(/\{\{[\d}]*?\}\}/, function() {
                let match = '<span name=' + count + ' class="c-inlineblack c-lh36 c-mh10 c-minw140 c-inlineblack c-bd0 c-br0 c-fc-mblue c-textAlign-c c-ph10 c-p c-bg-white" style="text-align-last: center;font-size: 0.6rem;border-bottom:1px solid">'
                if ($this.questionInfo.userAnswer[i] && $this.questionInfo.userAnswer[i].value != '') {
                  match += "<span class='c-textAlign-c c-inlineblack c-w100 selectClass' value=" + i + ">" + $this.questionInfo.userAnswer[i].value + "</span>"
                } else {
                  match += "<span class='c-textAlign-c c-inlineblack c-w100 selectClass' value=" + i + ">未答题</span>"
                }
                match += '</span>'
                return match
              })
              $this.$nextTick(function () {
                $this.bineSelect();
              })
            }
          } else {
            for (let i = 0; i < count; i++) {
              $this.questionInfo.problem = $this.questionInfo.problem.replace(/\{\{[\d}]*?\}\}/, function() {
                const newOption = $this.questionInfo.newOption[i]
                let addSpane = true
                let match = '<span name=' + count + ' class="c-inlineblack c-lh36 c-mh10 c-minw140 c-bd0 c-br0 c-fc-mblue c-textAlign-c c-ph10 c-p c-bg-white" style="text-align-last: center;font-size: 0.6rem;border-bottom:1px solid">'
                  for (let j = 0; j < newOption.options.length; j++) {
                    if (newOption && newOption.length != 0) {
                      if ($this.questionInfo.userAnswer && $this.questionInfo.userAnswer[i] && $this.questionInfo.userAnswer[i].value == newOption.options[j].name) {
                        match += "<span class='c-textAlign-c selectClass c-inlineblack c-w100' value=" + i + ">" + newOption.options[j].name + "</span>"
                        addSpane = false
                        break
                      } else {
                        addSpane = true
                      }
                    }
                  }
                  if (addSpane) {
                      match += "<span class='c-textAlign-c selectClass c-inlineblack c-w100'  value=" + i + ">" + (i + 1) + ". 点击答题</span>"
                  }
                match += '</span>'
                return match
              })
              $this.$nextTick(function () {
                $this.bineSelect();
              })
              $this.clickShow = true
            }
          }
        }
        if ($this.questionInfo.type == 4 || $this.questionInfo.smallType == 4) {
          if ($this.questionInfo.userAnswer != null) {
            if ($this.questionInfo.userAnswer == '1') {
              $this.userAnswer = '正确'
            } else if ($this.questionInfo.userAnswer == '-1') {
              $this.userAnswer = '错误'
            }
          }
        } else {
          $this.userAnswer = $this.questionInfo.userAnswer
        }
        if ($this.questionInfo.type == 1 || $this.questionInfo.type == 2 || $this.questionInfo.smallType == 1 || $this.questionInfo.smallType == 2) {
          if ($this.questionInfo.userAnswer != null) {
            for (let i = 0; i < $this.questionInfo.userAnswer.length; i++) {
              if ($this.questionInfo.userAnswer[i] == 'A') {
                $this.answerList[0] = true;
                $this.optionClass[0] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'B') {
                $this.answerList[1] = true;
                $this.optionClass[1] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'C') {
                $this.answerList[2] = true;
                $this.optionClass[2] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'D') {
                $this.answerList[3] = true;
                $this.optionClass[3] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'E') {
                $this.answerList[4] = true;
                $this.optionClass[4] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'F') {
                $this.answerList[5] = true;
                $this.optionClass[5] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'G') {
                $this.answerList[6] = true;
                $this.optionClass[6] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'H') {
                $this.answerList[7] = true;
                $this.optionClass[7] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'I') {
                $this.answerList[8] = true;
                $this.optionClass[8] = 'choose';
              }
              if ($this.questionInfo.userAnswer[i] == 'J') {
                $this.answerList[9] = true;
                $this.optionClass[9] = 'choose';
              }
            }
          }
        } else if ($this.questionInfo.type == 4 || $this.questionInfo.smallType == 4) {
          if ($this.questionInfo.userAnswer != null) {
            if ($this.questionInfo.userAnswer == '1') {
              $this.answerList[0] = true;
              $this.optionClass[0] = 'choose';
            } else if ($this.questionInfo.userAnswer == '-1') {
              $this.answerList[1] = true;
              $this.optionClass[1] = 'choose';
            }
          }
        }
        if ($this.questionInfo.type == 5 || $this.questionInfo.smallType == 5) { //填空题
          $this.clickShow = true
          let _obj = JSON.stringify($this.questionInfo.answer); //深拷贝出来处理，不影响原数据
          if ($this.questionInfo.userAnswer == null || ($this.questionInfo.userAnswer.length == 1 && $this.questionInfo.userAnswer[0].value == '')) {
            $this.fbAnswer = JSON.parse(_obj);
            $this.fbAnswer.forEach(item => {
              item.value = "";
            })
          } else {
            let _obj2 = JSON.stringify($this.questionInfo.userAnswer);
            $this.fbAnswer = JSON.parse(_obj2);
          }
        }
        if ($this.questionInfo.type == 3 || $this.questionInfo.smallType == 3 || ($this.questionInfo.type == 9 && $this.questionInfo.smallType == 3)) {
          if ($this.questionInfo.userAnswer != null) {
            $this.essayAnswer = $this.questionInfo.userAnswer
          } else {
            $this.essayAnswer = ''
          }
          $this.clickShow = true
          if ($this.questionInfo.imgArr && $this.questionInfo.imgArr.length > 0) {
            for (let item of $this.questionInfo.imgArr) {
              let urlObj = {
                url: item.url
              };
              $this.uploadImgList.push(urlObj);
            }
          }
        }
        if ($this.questionInfo.type == 9) {
          if ($this.questionInfo.smallNumber == 1) {
            $this.moreQue = true
          }
          if ($this.questionInfo.status != -1) {
            moreTimeControl = setTimeout(() => {
              if (!!$this.$refs.bigProblem && $this.$refs.bigProblem.offsetHeight < 80) {
                $this.showmoTest = false
              } else {
                $this.showmoTest = true
              }
            }, 400)
          }
          $this.isOver = (($this.num == $this.questionInfo.totalNum) && ($this.questionInfo.hasSmallNum == $this.questionInfo.smallNumber)) ? 1 : 0;
        } else {
          $this.isOver = $this.num < $this.questionInfo.totalNum ? 0 : 1;
        }
        if ($this.questionInfo.userAnswer && $this.leftNumFlag == true) {
          $this.setAnalysisStyle($this.userAnswer, $this.questionInfo.answer);
          $this.showAnalysis = true;
        }
      });
    },
    bineSelect() {
      let btn = document.getElementsByClassName('selectClass')
      Array.from(btn).forEach(element => {
        element.addEventListener('click', this.getSelect);
      });
    },
    getSelect(event) {
      var currentTarget = event.currentTarget; // 指向添加监听器的元素
      this.selectIndex = currentTarget.getAttribute('value'); // 获取其属性
      this.answerList = [false, false, false, false, false, false, false, false, false, false];
      this.optionClass = ['noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose', 'noChoose'];
      if (this.userAnswer) {
        if (this.userAnswer[this.selectIndex].value == 'A') {
          this.answerList[0] = true;
          this.optionClass[0] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'B') {
          this.answerList[1] = true;
          this.optionClass[1] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'C') {
          this.answerList[2] = true;
          this.optionClass[2] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'D') {
          this.answerList[3] = true;
          this.optionClass[3] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'E') {
          this.answerList[4] = true;
          this.optionClass[4] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'F') {
          this.answerList[5] = true;
          this.optionClass[5] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'G') {
          this.answerList[6] = true;
          this.optionClass[6] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'H') {
          this.answerList[7] = true;
          this.optionClass[7] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'I') {
          this.answerList[8] = true;
          this.optionClass[8] = 'choose';
        }
        if (this.userAnswer[this.selectIndex].value == 'J') {
          this.answerList[9] = true;
          this.optionClass[9] = 'choose';
        }
      }
      this.showSelectModal = true
    },
      //开始播放音频
    audioCanPlay(e) {
      isCanPlay = true;
      this.duration = Math.floor(e.target.duration);
      this.duration = Math.floor(document.getElementById('audio').duration)
      this.playtotalTime = this.timeToStr(this.duration)
      console.log("audioCanPlay-----------");
    },
    ancyAudioCanPlay(e) {
      ancyisCanPlay = true;
      this.ancyduration = Math.floor(e.target.duration);
      this.ancyduration = Math.floor(document.getElementById('ancyaudio').duration)
      this.ancyplaytotalTime = this.timeToStr(this.ancyduration)
    },
    audioTimeUpdate() {
      // //如果正在拖动  还不能播放，则不更新时间
      if (this.dragFlag && !isCanPlay) {
        return;
      }
      playTimeControl = setTimeout(() => {
        if (document.getElementById('audio') && Math.floor(document.getElementById('audio').currentTime) > 0) {
          this.audioPlayTime = Math.floor(document.getElementById('audio').currentTime);
          this.playtime = this.timeToStr(this.audioPlayTime)
        }
      }, 200)
      console.log("audioTimeUpdate-----------");
    },
    ancyAudioTimeUpdate() {
      // //如果正在拖动  还不能播放，则不更新时间
      if (this.ancydragFlag && !ancyisCanPlay) {
        return;
      }
      ancyplayTimeControl = setTimeout(() => {
        if (document.getElementById('ancyaudio') && Math.floor(document.getElementById('ancyaudio').currentTime) > 0) {
          this.ancyaudioPlayTime = Math.floor(document.getElementById('ancyaudio').currentTime);
          this.ancyplaytime = this.timeToStr(this.ancyaudioPlayTime)
        }
      }, 200)
    },
    dragStart() {
      this.dragFlag = true;
    },
    ancydragStart() {
      this.ancydragFlag = true;
    },
    inputChange(value) {
      console.log("inputChange-----------");
      if (this.dragFlag) {
        this.dragFlag = false;
        return;
      }
      document.getElementById('audio').currentTime = this.audioPlayTime;
    },
    ancyinputChange(value) {
      console.log("inputChange-----------");
      if (this.ancydragFlag) {
        this.ancydragFlag = false;
        return;
      }
      document.getElementById('ancyaudio').currentTime = this.ancyaudioPlayTime;
    },
    dragging() {
      this.dragFlag = true;
      clearInterval(playTimeControl);
      console.log("dragging------");
    },
    ancydragging() {
      this.ancydragFlag = true;
      clearInterval(ancyplayTimeControl);
      console.log("dragging------");
    },
    //拖动结束，更改播放器当前时间，重新开始循环获取当前时间
    dragEnddragEnd() {
      document.getElementById('audio').currentTime = this.audioPlayTime;
      this.dragFlag = false;
      console.log("dragEnd-----------");
    },
    //拖动结束，更改播放器当前时间，重新开始循环获取当前时间
    ancydragEnddragEnd() {
      document.getElementById('ancyaudio').currentTime = this.ancyaudioPlayTime;
      this.ancydragFlag = false;
      console.log("dragEnd-----------");
    },
    firstPlay() {
      this.showFirstSpeak = false;
      this.showLoudspeaker = true;
      this.playRadio();
      if (ancyPlayer) {
        ancyPlayer.pause();
      }
      if (document.getElementById("ancyaudio").src != '') {
        document.getElementById('ancyaudio').pause();
        this.ancyshowFirstSpeak = true
      }
    },
    ancyfirstPlay() {
      this.ancyshowFirstSpeak = false;
      this.ancyshowLoudspeaker = true;
      this.ancyplayRadio();
      if (player) {
        player.pause();
      }
      if (document.getElementById("audio").src != '') {
        document.getElementById('audio').pause();
        this.showFirstSpeak = true
      }
    },
    replay() {
      this.audioPlayTime = 0
      document.getElementById('audio').currentTime = this.audioPlayTime;
      this.showLoudspeaker = true;
      this.playRadio();
      if (ancyPlayer) {
        ancyPlayer.pause();
      }
      if (document.getElementById("ancyaudio").src != '') {
        document.getElementById('ancyaudio').pause();
        this.ancyshowFirstSpeak = true
      }
    },
    ancyreplay() {
      this.ancyaudioPlayTime = 0
      document.getElementById('ancyaudio').currentTime = this.ancyaudioPlayTime;
      this.ancyshowLoudspeaker = true;
      this.ancyplayRadio();
      if (player) {
        player.pause();
      }
      if (document.getElementById("audio").src != '') {
        document.getElementById('audio').pause();
        this.showFirstSpeak = true
      }
    },
    pause() {
      this.showFirstSpeak = true
      document.getElementById("audio").pause();
    },
    ancypause() {
      this.ancyshowFirstSpeak = true
      document.getElementById("ancyaudio").pause();
    },
    playRadio() {
      let audio = document.getElementById("audio");
      if (this.questionInfo.resourceType == 2 && this.questionInfo.resourceUrl != '') {
        if (this.isWeiXin) {
          try {
            document.addEventListener(
                "WeixinJSBridgeReady",
                function () {
                  document.getElementById("audio").play();
                },
                false
              );
              WeixinJSBridge.invoke("getNetworkType", {}, function (e) {// eslint-disable-line
                // 在这里拿到 e.err_msg, 这里面就包含了所有的网络类型
                document.getElementById("audio").play();
                console.log("WeixinJSBridgeWeixinJSBridgeWeixinJSBridgeWeixinJSBridge");
              });
          } catch (error) {
            // continue regardless of error
          }
        } else {
          audio.load();
          audio.play();
        }
      }
    },
    ancyplayRadio() {
      let audio = document.getElementById("ancyaudio");
      if (this.questionInfo.analysisRtype == 2 && this.questionInfo.analysisRurl != '') {
        if (this.isWeiXin) {
          try {
            document.addEventListener(
                "WeixinJSBridgeReady",
                function () {
                  document.getElementById("ancyaudio").play();
                },
                false
              );
              WeixinJSBridge.invoke("getNetworkType", {}, function (e) {// eslint-disable-line
                // 在这里拿到 e.err_msg, 这里面就包含了所有的网络类型
                document.getElementById("ancyaudio").play();
                console.log("WeixinJSBridgeWeixinJSBridgeWeixinJSBridgeWeixinJSBridge");
              });
          } catch (error) {
            // continue regardless of error
          }
        } else {
          audio.load();
          audio.play();
        }
      }
    },
    playAudioEnd() {
      this.showLoudspeaker = false;
    },
    ancyPlayAudioEnd() {
      this.ancyshowLoudspeaker = false;
    },
    onPlayTimeChange(playTime, allTime) {
      this.audioPlayTime = playTime;
    },
    ancyOnPlayTimeChange(playTime, allTime) {
      this.ancyaudioPlayTime = playTime;
    },
    playAudioError() {},
    ancyPlayAudioError() {},
    questionCollect() {
      let url = ''
      if (this.questionInfo.isCollect == 1) {
        url = 'itemBank/removeQuestionCollect'
      } else if (this.questionInfo.isCollect == 0) {
        url = 'itemBank/joinQuestionCollect'
      }
      utilJs.postMethod(global.apiurl + url, {
          libraryId: this.libraryId,
          questionId: this.questionInfo.type == 9 ? this.questionInfo.parentId : this.questionInfo.questionId,
        },
          res => {
            this.$showCjToast({
              text: res,
              position: "middle",
              type: "success"
            });
            if (this.questionInfo.isCollect == 1) {
              this.questionInfo.isCollect = 0
            } else if (this.questionInfo.isCollect == 0) {
              this.questionInfo.isCollect = 1
            }
          },
          failRes => {
          }
        )
    },
    closeModal() {
      this.showModal = false
    },
    onConfirmOverLive() {
      let $this = this
      utilJs.postMethod(global.apiurl + 'itemBank/feedbackError', {
        libraryId: $this.libraryId,
        questionId: $this.questionInfo.questionId,
        errContent:$this.errContent
      },
        res => {
          $this.$showCjToast({
            text: res,
            position: "middle",
            type: "success"
          });
          $this.isFeedback = 1
          $this.closeModal()
        },
        failRes => {
        }
      )
    },
    wrongFeedback() {
      this.showModal = true
    },
    showAnswer() {
      if (this.showAnalysis == false) {
        let fbComplete = false;
        if (this.questionInfo.type == 5 || this.questionInfo.smallType == 5) {
          this.fbAnswer.forEach(item => {
            if (item.value.trim() == "") {
              fbComplete = true;
            }
          })
        }
        this.userAnswer = this.transAnswerText();
        if (this.questionInfo.type == 11) {
          this.userAnswer.forEach(item => {
            if (item.value.trim() == "") {
              fbComplete = true;
            }
          })
        }
        if (this.questionInfo.type != 9) {
          if (((this.questionInfo.type != 5 && this.questionInfo.type != 11 && this.questionInfo.smallType != 5) && this.userAnswer.trim() == "") || ((this.questionInfo.type == 5 || this.questionInfo.smallType == 5) && fbComplete) || ((this.questionInfo.type == 11) && fbComplete)) {
            this.$showCjToast({
              text: (this.questionInfo.type <= 2 || (this.questionInfo.smallType > 0 && this.questionInfo.smallType <= 2)) ? "请选择答案" : "请填写答案",
              position: "middle",
              type: "warn"
            });
          } else {
              this.setAnalysisStyle(this.userAnswer, this.questionInfo.answer);
            this.showAnalysis = true;
          }
        } else {
          console.log(fbComplete, 22222222222)
          if ((this.questionInfo.type != 5 && this.questionInfo.smallType != 5 && this.userAnswer.trim() == "") || (this.questionInfo.smallType == 5 && fbComplete)) {
            this.$showCjToast({
              text: this.questionInfo.smallType <= 2 ? "请选择答案" : "请填写答案",
              position: "middle",
              type: "warn"
            });
          } else {
              this.setAnalysisStyle(this.userAnswer, this.questionInfo.answer);
            this.showAnalysis = true;
          }
        }
      }
    },
    //分享
    wechatShare: function () {
      let title = this.questionInfo.libraryName;
      let shareImg = this.questionInfo.avatar || require('../../../assets/examination_defult.png');
      let shareDesc = this.questionInfo.libraryDesc;//"共包含"+this.questionInfo.hasPaper+"套考卷";
      let shareUrl = ''
      let $this = this
      shareUrl = `${window.location.href.split("#")[0]}#/homePage/itemBank/questionSaleDetail?libraryId=${$this.libraryId}&refereeId=${localStorage.getItem("userId")}`;
      utilJs.wechatConfig(shareUrl, title, shareImg, shareDesc, function () { }, true);
    },
    //手机端分享
    appShare: function () {
      let title = this.questionInfo.libraryName;
      let shareImg = this.questionInfo.avatar || require('../../../assets/examination_defult.png');
      let shareUrl = ''
      let $this = this
      shareUrl = `${window.location.href.split("#")[0]}#/homePage/itemBank/questionSaleDetail?libraryId=${$this.libraryId}&refereeId=${localStorage.getItem("userId")}`;
      var shareDesc = this.questionInfo.libraryDesc;
      utilJs.appShareTrue(title, shareImg, shareUrl, shareDesc);
    }
  },
  beforeRouteLeave(to, from, next) {
    if (player) {
      destoryPlayer(player);
      player = null;
      // document.querySelector("#liveVideoIntroParent").innerHTML = "";
    }
    if (ancyPlayer) {
      destoryPlayer(ancyPlayer);
      ancyPlayer = null;
      // document.querySelector("#liveVideoIntroParent").innerHTML = "";
    }
    clearInterval(aswerControl);
    clearInterval(moreTimeControl);
    next();
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->

<style scoped>
.options-item {
  background-color: #eff0f2;
}
.btn-wrap {
  width: 100%;
  max-width: 640px;
  position: fixed;
  bottom: 1.5rem;
  /* z-index: 11; */
}
.btn-next-question {
  text-align: center;
  border-radius:0.9rem 0px 0px 0.9rem;
  box-shadow:0px 0px 9px 1px rgba(0, 0, 0, 0.05);
  /*width: 3.75rem;
  height: 1.4rem;
  line-height: 1.4rem;
  border-radius: 0.25rem;
  border: 1px solid #999;
  font-size: 0.7rem;
  text-align: center;
  margin: 2rem auto 1.6rem auto;*/
}
.btn-befor-question {
  text-align: center;
  border-radius:0px 0.9rem 0.9rem 0px;
  box-shadow:0px 0px 9px 1px rgba(0, 0, 0, 0.05);
}
.btn-pause {
  font-size: 0.8rem;
  width: 7.5rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  border-radius: 1rem;
  border: 1px solid #999;
  background-color: #fff;
  margin: 1.65rem auto 0 auto;
}
.op-type {
  flex-shrink: 0;
}
.c-mh90 {
  min-height: 2.25rem;
}
.time-bg-bar {
  height: 2px;
  position: relative;
  background: #6c83ff;
}
.time-bar {
  height: 2px;
  position: absolute;
  top: 0;
  right: 0;
  background-color: #e2e2e2;
}
.c-mr68 {
  margin-right: 1.7rem;
}
.noChoose {
  border: 1px solid #e5e5e5;
  /* background-color: #ededed; */
}
.choose {
  color: #fff;
  background-color: #6C83FF;
}
.analysisRight {
  color: #fff;
  background-color: #6C83FF;
}
.analysisUser {
  color: #fff;
  background-color: #FC583D;
}
.fc-right {
  color: #6C83FF;
}
.fc-wrong {
  color: #FC583D;
}
.btn-shadow {
  box-shadow: 0 -4px 4px #eee;
}
.c-fc-1b {
  color: #1b1b1b;
}
.c-text-indent50 {
  text-indent: 1.25rem;
}
input[type="text"],
input[type="button"],
input[type="submit"],
input[type="reset"] {
  -webkit-appearance: none;
}
textarea {
  box-shadow: 0px 0px 0px rgba(0, 0, 0, 0);
  -webkit-appearance: none;
}
.c-ww54 {
  width: 1.35rem;
}
.short-answer-textarea {
  height: 5.75rem;
  outline: none;
  border: none;
  -webkit-appearance: none;
  resize: none;
}
.c-bd1-ed {
  border: 1px solid #ededed;
}
.c-bd1-d7{
  border: 1px solid #d7d7d7;
}
.del-img {
  position: absolute;
  top: -0.4rem;
  right: -0.2rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: #3d3d3d;
}
.orange-opa {
  color: rgba(255, 120, 0, 0.6);
}
.bd-e6 {
  border: 1px solid #e6e6e6;
}
.bg-fa {
  background-color: #fafafa;
}
.bd-xblue {
  border: 1px solid #2194ff;
}
.lr-auto {
  margin-left: auto;
  margin-right: auto;
}
.bg-e6 {
  background-color: #e6e6e6;
}
.bg-lineargradient{
  background:linear-gradient(90deg,rgba(154,170,255,1),rgba(108,131,255,1));
}
.c-bg-time{
  background:rgba(108,131,255,0.1);
}
.chanDeg{
  display: inline-block;
  transform: rotate(180deg)
}
.maxMask{
  mask-image: linear-gradient(to top,rgba(255,255,255,0) 0,rgba(255,255,255,0.7) 10%,rgba(255,255,255,1) 15%,rgba(255,255,255,1) 100%)
}
.chanDeg90{
  transform: rotate(90deg);
  display: inline-block;
}
.chanDeg-90{
  transform: rotate(-90deg);
  display: inline-block;
}
.examAnswer img{display: inline; vertical-align: middle;}
.Analysis img{
  display: block
}
.c-whiteOpcity03{
background: rgba(255,255,255,0.3);
}
.dot-peinner {
  /* text-align: center; */
  /* line-height: 0.8rem; */
  position: relative;
  background: rgba(255,255,255,1);
}
.audioPlay /deep/ .vue-slider-dot {
  width: auto !important;
  height: auto !important;
  /* padding: 5px; */
}
#liveVideoIntroParent{
  width: 100% !important;
  /* height: auto !important; */
  /* padding: 5px; */
}
#ancyVideoIntroParent {
  width: 100% !important;
}
#ancyVideoIntroParent /deep/ .xgplayer-start{
  z-index: 99;
}
.imgInlineb  /deep/ img{display: inline-block;vertical-align: middle;}
.problemdDom /deep/ img{
  display: inline-block;
  vertical-align: middle;
}
.problemdDom /deep/ p{
  text-align: left!important;
}
.problemdDom /deep/ p img{
  display: block;
}
.problemdDom /deep/ .wscnph{
  display: block;
}
.rightClass{
  color: #6c83ff;
}
.chooseKnow{
  background: rgba(109,65,242,0.1);
  color: #6D41F2;
}
.box {
  box-sizing: border-box;
  position: relative;
}
.wifi-symbol {
  width: 1rem;
  height: 1rem;
  overflow: hidden;
  position: relative;
  transform: rotate(135deg);
  -webkit-transform-origin: center;
  transform-origin: center;
  -webkit-transform: translate3d(135deg,0,0);
  -webkit-backface-visibility: hidden;
}
.wifi-circle {
  /* border: 0.1rem solid #999999; */
  border-radius: 50%;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  position: absolute;
  -webkit-transform: translate3d(0,0,0);
}

.first {
  width: 0.1rem;
  height: 0.1rem;
  background: #cccccc;
  top: 0.9rem;
  left: 0.9rem;
}
.second {
  width: 0.5rem;
  height: 0.5rem;
  top: 0.7rem;
  left: 0.7rem;
}
.seconAnimation{
  animation: fadeInOut 1s infinite 0.2s;
}
.third {
  width: 0.8rem;
  height: 0.8rem;
  top: 0.5rem;
  left: 0.5rem;
}
.thirdAnimation{
  animation: fadeInOut 1s infinite 0.4s;
}
@keyframes fadeInOut {
    0% {
        opacity: 0; /*初始状态 透明度为0*/
    }
    100% {
        opacity: 1; /*结尾状态 透明度为1*/
    }
}
.input-overIpt {
  /* border: none;
  -webkit-appearance: none; */
  border: 1px solid #e5e5e5;
}
.iptClass{
  background: #F2F3F2;
  border: 2px solid #F2F3F2;
}
.textarea {
  font-size: 0.6rem;
  outline: none;
  border: none;
  width: 100%;
  height: 2rem;
  background: none;
  -webkit-appearance: none;
  resize: none;
  padding: 0.6rem 0;
}
.textarea:focus {
  outline: none;
}
.textarea::-webkit-input-placeholder {
  color: #999;
}
.newTest{
  background: #FEF2EB;
  color: #FF300C;
  text-align: center;

}
</style>


